<?php
/*
 * Function:
 * Project :SuperEMall
 *
 * Dreamxyp(QQ:31996798) - GZ - PHP - ObjectIndex.class.php
 * Coding  :xiayiping[xiayiping_xyp@163.com]
 * Created on 2008-4-6
 */
 class ObjectIndex extends ObjectBase
 {
     public function __construct()
     {
		//$this->ws();
		
		$this->init();
		
		/*$db_admin	= &$this->db("admin");
		//活动
		$activity   = $db_admin->dataArray("select * from `ad_index_activity` limit 0,3");
		//系统公告
		$affiche    = $db_admin->dataArray("select * from `ad_index_affiche` limit 0,2");
		//注册下的文字连
		$txt_ad     = $db_admin->dataArray("select * from `ad_index_txt_ad` limit 0,16");
		//热门FAQ
		$hot_faq    = $db_admin->dataArray("select * from `ad_index_hot_faq` limit 0,10");
		//推荐小店
		$hot_shop   = $db_admin->dataArray("select * from `ad_index_hot_shop` limit 0,10");
		//热门商品
		$hot_pct    = $db_admin->dataArray("select * from `ad_index_hot_pct` limit 0,10");
		//分类
		$db_goods	= &$this->db("goods");
		$rs 		= $db_goods->dataArray("select * from `cats_c1` where  `sub` = 1 order by taxis,c1id limit 0,45");
		$c1id		= array();
		$PctClass	= array();
		foreach($rs as $v)
		{ 
			$c1id[] = $v['c1id'];
			$PctClass['name'][$v['c1id']] = $v['name'];
		}
		//子分类
		$rs			 = $db_goods->dataArray("select * from `cats_c2` where c1id in(?) order by taxis,c2id",$c1id);
		foreach($rs as $v)
		{
			$PctClass['sub'][$v['c1id']][$v['c2id']] = $v;
		}
		$this->stpl->assign('activity',$activity);
		$this->stpl->assign('affiche',$affiche);
		$this->stpl->assign('txt_ad',$txt_ad);
		$this->stpl->assign('hot_faq',$hot_faq);
		$this->stpl->assign('hot_shop',$hot_shop);
		$this->stpl->assign('hot_pct',$hot_pct);
		$this->stpl->assign('PctClass',$PctClass);*/
		$this->stpl->output("index.html");       
     }
 }
?>
